<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAgentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('agents', function (Blueprint $table) {
            $table->increments('id');
			$table->unsignedMediumInteger('admin_id')->default(0)->comment('管理员ID');
			$table->string('name', 16)->default('')->comment('名称');
			$table->boolean('state')->default(1)->comment('1:正常 2:禁用');
			$table->string('charter', 16)->default('')->comment('营业执照');
			$table->string('id_number', 18)->default('')->comment('法人身份证号');
			$table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('agents');
    }
}
